package com.example.layered_arch.example.repository;

import com.example.layered_arch.example.entity.Product;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ProductRepository extends JpaRepository<Product, Integer> {
    // 根据分类查询商品
    List<Product> findByCategory(String category);

    // 根据热度查询商品
    List<Product> findByPopularityGreaterThan(int popularity);
}
